/**
 *******************************************************************************
 * @FileName  : aes.c
 * @Author    : GaoQiu
 * @CreateDate: 2020-05-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 */
#include "aes.h"
#include "platform/platform.h"
#include "app_config.h"
#include "utils/track.h"

uint8_t key[]= {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99};
uint8_t plainText[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
uint8_t cipherText[16] = {0};
uint8_t cpyText[16] = {0};


void AES_SetUp(void)
{
	delay_ms(10);

	TRACK("===========================\n");

	TRACK("Plain Text:");
	TRACK_DATA(plainText, 16);

	TRACK("\nAES Encrypt Start...\nCipher Text: ");
	AES_Encrypt(cipherText, plainText, key);
	TRACK_DATA(cipherText, 16);
	TRACK("AES Encrypt Ok...\n\n");

	TRACK("AES Decrypt Start...\nPlain Text: ");
	AES_Decrypt(cpyText, cipherText, key);
	TRACK_DATA(cpyText, 16);
	TRACK("AES Decrypt Ok...\n\n");
}


void AES_Loop(void)
{

}


